<?php
  try {

  $G_MAIN_MENU = 'workflow';
  $G_SUB_MENU = 'hrPositions';
  $G_ID_MENU_SELECTED = '';
  $G_ID_SUB_MENU_SELECTED = '';

  $G_PUBLISH = new Publisher;

  require_once ( PATH_PLUGINS . 'hr' . PATH_SEP . 'class.hr.php');
  $pluginObj = new hrClass ();

  require_once ( "classes/model/HrPositions.php" );

  $Criteria = new Criteria('workflow');
  $Criteria->clearSelectColumns ( );

  $Criteria->addSelectColumn (  HrPositionsPeer::POSITION_UID );
  $Criteria->addSelectColumn (  HrPositionsPeer::DEPARTMENT_ID );
  $Criteria->addSelectColumn (  HrPositionsPeer::POSITIONCODE );
  $Criteria->addSelectColumn (  HrPositionsPeer::POSITIONTITLE );
  $Criteria->addSelectColumn (  HrPositionsPeer::TYPEPOSITION_ID );
  $Criteria->addSelectColumn (  HrPositionsPeer::ASSIGNMENTAREA_ID );
  $Criteria->addSelectColumn (  HrPositionsPeer::LOWGRADE_ID );
  $Criteria->addSelectColumn (  HrPositionsPeer::HIGHGRADE_ID );
  $Criteria->addSelectColumn (  HrPositionsPeer::POSITIONCOMMENT );
  $Criteria->addSelectColumn (  HrPositionsPeer::POSITIONDESCRIPTION );
  $Criteria->addSelectColumn (  HrPositionsPeer::NUMBEROFWORKDAYS );
  $Criteria->addSelectColumn (  HrPositionsPeer::STATUS );
  $Criteria->addSelectColumn (  HrPositionsPeer::RETIREMENTCODE );
  $Criteria->addSelectColumn (  HrPositionsPeer::EEOCATEGORY_ID );
  $Criteria->addSelectColumn (  HrPositionsPeer::CLASSIFICATION_ID );

  $Criteria->add (  hrPositionsPeer::POSITION_UID, "xx" , CRITERIA::NOT_EQUAL );
  // rme added
  $Criteria->addDescendingOrderByColumn (  HrPositionsPeer::DEPARTMENT_ID );
  // rme end

  $G_PUBLISH->AddContent('propeltable', 'paged-table', 'hr/hrPositionsList', $Criteria , array(),'');
  G::RenderPage('publish', 'blank');

  }
  catch ( Exception $e ) {
    $G_PUBLISH = new Publisher;
    $aMessage['MESSAGE'] = $e->getMessage();
    $G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/showMessage', '', $aMessage );
    G::RenderPage( 'publish', 'blank' );
  }
